<template>
    <div>
        <el-header style="font-size: 20px;position: relative;left: -20px;top: 20px">
            <i class="el-icon-user"></i>/费用减免信息
        </el-header>
        <div class="message">
            <div style="padding: 10px" class="grid-content bg-purple"><span>案号:</span><br>{{caseDecrease.caseNo}}</div>
            <div style="padding: 10px" class="grid-content bg-purple"><span>委托人:</span><br>{{caseDecrease.caseWtr}}</div>
            <div style="padding: 10px" class="grid-content bg-purple"><span>提交人:</span><br>{{caseDecrease.person}}</div>
            <div style="padding: 10px"  class="grid-content bg-purple"><div><span>减免金额:</span><br>{{caseDecrease.decreaseMoney}}</div></div>
            <div style="padding: 10px" class="grid-content bg-purple"><span>申请日期:</span><br>{{caseDecrease.applyDate}}</div>
            <div style="padding: 10px" class="grid-content bg-purple"><span>减免事由:</span><br>{{caseDecrease.reason}}</div>
            <div style="padding: 10px" class="grid-content bg-purple"><span>退款申请单:</span><br>
                <a style="color: #5daf34" :href="url">下载退款申请单</a>
            </div>
            <div style="padding: 10px" class="grid-content bg-purple"><span>备注:</span><br>{{caseDecrease.caseParties}}</div>
        </div>
    </div>
</template>

<script>

    import {CaseDecreaseService} from '../../../model/gs/CaseDecreaseService.js'
    var caseDecreaseService = CaseDecreaseService.getInstance()

    export default {
        name: "FeeRemission",
        props:['id'],
        data(){
            return{
                id2:this.id,
                caseDecrease:{},
                url:''
            }
        },
        watch:{
            id:function () {
                this.id2=this.id
            }
        },
        methods:{
            selectByCaseLaw(){
                caseDecreaseService.selectIdforMoneymoney(this.id2).then(response=>{
                    this.caseDecrease=response.data.data
                    this.url = 'http://localhost/download?url=https://qy-file-bucket.oss-cn-beijing.aliyuncs.com/RecordDocument/bdd6e47c-172d-4e04-a823-52b3cc3a437b.doc?Expires=1927089124&OSSAccessKeyId=LTAI4GCXS6Qi9BqpB7S55n3u&Signature=iZc4fbjxCWEID48mDgROzstxStg%3D&name=退款申请单&token='+this.token
                })
            },
            goBack(){
                this.$emit('back')
            }
            },
        computed:{
            checkRoute:{
                get(){
                    return this.$route.path == '/Mybacklog'
                }
            },
            token:{
                get(){
                    return this.$store.state.token
                }
            }
        },
        created(){
            this.selectByCaseLaw()
        }
    }
</script>

<style scoped>
    .message{
        display: flex;
        flex-wrap: wrap;
        width: 100%;
    }
    .bg-purple {
        background: #FFFFFF;
        border: 1px solid   darkgray;
        width: 23.5%;
        height: 50px;
    }
</style>
